<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@include file="/common/common.jsp"%>
<script src="OrderMgr/script/jquery-1.7.2.min.js"></script>
<html>
	<head>	
		<title>当前房态</title>
		<style>
		    *{
		      color: #0360AF;
		      font-family:arial,宋体,sans-serif;
		      font-size:14px;
		    }
		        		
		    .roomlist{
		      border: 1px solid #B8BBCC;
		      border-collapse: collapse;
		    }
		    
		    
		    td{
		      padding: 0px;
		      border: 1px solid #DDDDDD;  
		    }
		    
		    .info{
		      border-top-width: 0px; 
		      border-bottom-width: 1px;
		      border-left-width: 0px; 
		      border-right-width: 0px;
		      border-style:solid;
		      border-color:#B8BBCC;
		    }
		    
			.title{
				white-space:nowrap; 
				width:100%; 
				overflow:hidden; 
				text-overflow:ellipsis;
				text-align:center;
				height:29px;
				line-height:29px;
				font-weight:400;
				background: url("OrderMgr/img/header_bg.jpg") repeat-x scroll center center transparent;
			}
						
			.tips{
			   overflow:auto;
			   width:126px;
			   height:16px;	
			}
			
			.info{
			  text-align:center;
			  height:40px;
			  line-height:40px;
			  cursor: pointer;
			}
			
			.stop{
			   background:#C0C0C0;
			   font-color:white;
            }
            
			.bad{
			   background:#4E2F2F;
            }

			.clean{
			   background:green;
            }
            
			.dirty{
			   background:#97694F;
            }
            
            .tocheck{
               background:#FF8400;
            }
            
            .owneruse{
               background:#238E23;
            }
                        
		    .roomuse{
		      background:#3232CD;
		      color:white;
		    } 
		    
		    .icon{
		      width:16px;
		      height:16px;
		      display:inline-block;
		      margin-right: 2px;
		      float:left;
		      cursor: pointer;
		    }
		    
		    
		    .repair{
		    	background: url("OrderMgr/img/law.gif") no-repeat scroll 0 0 transparent;
		    }
		    	
		    .message{
		    	background: url("OrderMgr/img/mail.gif") no-repeat scroll 0 0 transparent;
		    }
		    		    	
		    .storage{
		    	background: url("OrderMgr/img/cart.gif") no-repeat scroll 0 0 transparent;
		    }   	
			       
		    .loan{
		    	background: url("OrderMgr/img/cart.gif") no-repeat scroll 0 0 transparent;
		    }   

		    .lost{
		    	background: url("OrderMgr/img/cart.gif") no-repeat scroll 0 0 transparent;
		    }   
		    
		    .wait{
		    	background: url("OrderMgr/img/wait.gif") no-repeat scroll 0 0 transparent;
		    }   

		    .leave{
		    	background: url("OrderMgr/img/cart.gif") no-repeat scroll 0 0 transparent;
		    }   
		    
		    .owe{
		    	background: url("OrderMgr/img/cart.gif") no-repeat scroll 0 0 transparent;
		    }  
		    	   
.tooltip {
    background:url(OrderMgr/img/black_arrow.png);
    height:122px;
    width:209px;
    font-size:11px;
    color:white;
    position:absolute;
    display:none;
    overflow:hidden;
}

.tooltipup {
    background:url(OrderMgr/img/black_arrow_up.png);
    height:122px;
    width:209px;
    font-size:11px;
    color:white;
    position:absolute;
    display:none;
    overflow:hidden;
}

.tooltip td, .tooltipup td{
	padding: 0px;
	border: 0px none transparent;  
	color:white;
	font-size:11px;
}
		 
.tipContent{
  text-align:center;
  width:100%;
  height:122px;
  line-height:122px;
}

.label{
  color:yellow;
  width:40%;
}

.tooltip .tbTip{
  width:100%;
  margin: 12px 0px 0px 12px;
  font-size:11px;
}
  
.tooltipup .tbTip{
  width:100%;
  margin: 24px 0px 0px 12px;
  font-size:11px;
}

a{
  text-decoration:none;
  color:white;
}

  	
		</style>
<link href="OrderMgr/script/jquery-ui.css" rel="stylesheet">
<link href="OrderMgr/script/jquery.multiselect.css" rel="stylesheet">
<script src="OrderMgr/script/jquery-ui.min.js"></script>
<script src="OrderMgr/script/jquery.multiselect.min.js"></script>

			<script type="text/javascript">
			
			  gRooms = [			     
			     {iroomid:"-1"}
			     <l:iterate property="rooms" id="gr">
			     ,{
			        iroomid:'<b:write property="iroomid" iterateId="gr"/>',
			        croomno:'<b:write property="croomno" iterateId="gr"/>',
			        croomtype:'<b:write property="croomtype" iterateId="gr"/>',	
			        croomstyle:'<b:write property="croomstyle" iterateId="gr"/>',		
			        caddress:'<b:write property="caddress" iterateId="gr"/>',
			        cguestname:'<b:write property="cguestname" iterateId="gr"/>',
			        igresid:'<b:write property="igresid" iterateId="gr"/>',
			        darrdate:'<b:write property="darrdate" iterateId="gr" formatPattern="yyyy-MM-dd hh:mm:ss"/>',
			        deporigdate:'<b:write property="deporigdate" iterateId="gr" formatPattern="yyyy-MM-dd hh:mm:ss"/>'
			     }
			     </l:iterate>
			  ];
			  			  
			  function getRoom4id(rid){
			     var len = gRooms.length; 
			     for(var i = 0; i < len; i++){
			       if (gRooms[i].iroomid == rid){
                      return gRooms[i];
                   }
			     }
			     return null;
			  }
			  
			  function showTip(current){
			  
			       var tip = $("#tipText");
			       if(tip.is(":visible")){
			         //tip.slideUp("fast");
			         tip.hide();
			       }
			       
			       
			       if (tip.attr("show") == "false"){
			         return;
			       }
			       
			       var room = getRoom4id(current.parent().parent().attr("roomid"));
			       var idx = current.parent().parent().parent()[0].rowIndex;
			       
			       if (!room){
			         return;
			       }
			       /****var token = '<table align="center" border="0" class="tbTip"><tr><td class="label">' + "房号:</td><td>" + room.croomno + "<td></tr>" +
			                   '<tr><td class="label">' + "房型:</td><td>" + room.croomtype + "<td></tr>" +
			                   '<tr><td class="label">' + "房景:</td><td>" + room.croomstyle + "<td></tr>" +
			                   '<tr><td class="label">' + "房间地址:</td><td>" + room.caddress + "<td></tr>";	                   
			     if (room.igresid){
			          token += '<tr><td class="label">' + "客户:</td><td>" + room.cguestname + "<td></tr>";
			          token += '<tr><td class="label">' + "抵店日期:</td><td>" + room.darrdate + "<td></tr>";
			          token += '<tr><td class="label">' + "预计离店:</td><td>" + room.deporigdate + "<td></tr>";		          	          
                }***/
                    var token = '<table align="center" border="0" class="tbTip"><tr><td class="label">' + "房间信息:</td><td>" + room.croomno + "&nbsp;" +
			                   room.croomtype + "&nbsp;" +
			                   room.croomstyle + "&nbsp;" +
			                   room.caddress + "<td></tr>";	                   
			        if (room.igresid){
			          token += '<tr><td class="label">' + "客户信息:</td><td>" + room.cguestname + "&nbsp;"+
			          room.darrdate + "&nbsp;" + 
			          room.deporigdate + "<td></tr>";		          	          
			        }
                    token += "</table>";
                    
                    
                    tip.empty().append($(token));
                    var curr = current, offset = curr.offset();
                    tip.css("left", offset.left + current.width() /2 - tip.width()/2);
                    
                    if (idx < 2){
                      tip.removeClass("tooltip").addClass("tooltipup");
                      tip.css("top", offset.top + current.height()); 
                    }else{
                      tip.removeClass("tooltipup").addClass("tooltip");
                      tip.css("top", offset.top - tip.height()); 
                    }

                    tip.slideDown("fast");
			  }
			  
			  
			  $(document).ready(function() {
			     $('#tipText').bind("click", function(){$(this).hide()});
			     
			     $('.title').bind("mouseover", function(){
			       			       
			       var tip = $("#tipText");
			       if(tip.is(":visible")){
			         tip.hide();
			       }
			       tip.attr("show", "true");
			       
			       var currentTitle = $(this);
			       setTimeout(function(){showTip(currentTitle)}, 400);
			       return;
			       
                    
			     }).bind("mouseout", function(){
			        $("#tipText").attr("show", "false");
			     });
			     
			     $("a").bind("click", function(){
			        window.open("com.hms.OrderMgr.WeOrdersVMaintain.flow?_eosFlowAction=update&select_objs[1]/iorderid=" + $(this).attr("orderid"));
			     });
			     
			     $(".info").bind("click", function(){
			        var ele = $(this)[0].className;
			        /***if (ele == "info"){
			           window.open("com.hms.OrderMgr.Warkin.flow?room/iroomid=" + $(this).closest("td").attr("roomid"));
			        }****/
			        window.open("com.hms.OrderMgr.Warkin.flow?room/iroomid=" + $(this).closest("td").attr("roomid"));
			     });
			     
			     $(".message").bind("click", function(){
			        window.open("com.hms.OrderMgr.WeGuesmessageMaintain.flow");
			     });
			     
			     $(".storage").bind("click", function(){
			        window.open("com.hms.OrderMgr.WeMaterialstorageMaintain.flow");
			     });
			     
			     $(".loan").bind("click", function(){
			        window.open("com.hms.OrderMgr.MaterialLoan.flow");
			     });
			     
			     $(".lost").bind("click", function(){
			        window.open("com.hms.OrderMgr.WeMateriallostMaintain.flow");
			     });
			     			     		     
			  });
			  

$(function(){
$("#cbxUse").multiselect(
{  header: false,
   noneSelectedText:"前台房态",
   selectedList:2
}
);

$("#cbxMgr").multiselect(
{  header: false,
   noneSelectedText:"客房状态",
   selectedList: 3 
}
);

$("#cbxArea").multiselect(
{  header: false,
   noneSelectedText:"小区",
   selectedList: 4
}
);

$("#cbxStyle").multiselect(
{  header: false,
   noneSelectedText:"房型",
   selectedList:10 
}
);

$("#cbxStyle").multiselect(
{  header: false,
   noneSelectedText:"房型",
   selectedList:10 
}
);

$("#cbxPre").multiselect(
{  header: false,
   noneSelectedText:"预抵/预离",
   selectedList:10 
}
);

$("#cbxInfo").multiselect(
{  header: false,
   noneSelectedText:"留言/寄存/遗留/租借",
   selectedList:10 
}
);

});


$(document).ready(function(){
   
   $("#btnQuery").bind("click", function(){

      
      var token = "", tk = "", found = false;
      
      var x = $("#cbxUse")[0].options.length;
      for(var i = 0; i < x; i++){
        var v = $("#ui-multiselect-cbxUse-option-" + i);
        if (v.attr("aria-selected") && v.attr("aria-selected") != "false"){
           tk = (tk == "" ? "": tk + ",") + v.attr("value");
           found = true;
        }
      }
      
      token += "<input type='hidden' name='criteria/_expr[1]/croomstatus' value=\"" + tk + "\">" +
               "<input type='hidden' name='criteria/_expr[1]/_op' value='in'>";
               
      tk = "";
      x = $("#cbxMgr")[0].options.length;
      for(var i = 0; i < x; i++){
        var v = $("#ui-multiselect-cbxMgr-option-" + i);
        if (v.attr("aria-selected") && v.attr("aria-selected") != "false"){
           tk = (tk == "" ? "": tk + ",") + v.attr("value");
           found = true;
        }
      }      
      token += "<input type='hidden' name='criteria/_expr[2]/cclstatus' value=\"" + tk + "\">" +
               "<input type='hidden' name='criteria/_expr[2]/_op' value='in'>";
     

      tk = "";
      x = $("#cbxArea")[0].options.length;
      for(var i = 0; i < x; i++){
        var v = $("#ui-multiselect-cbxArea-option-" + i);
        if (v.attr("aria-selected") && v.attr("aria-selected") != "false"){
           tk = (tk == "" ? "": tk + ",") + v.attr("value") ;
           found = true;
        }
      }      
      token += "<input type='hidden' name='criteria/_expr[3]/iresidentialareaid' value=\"" + tk + "\">" +
               "<input type='hidden' name='criteria/_expr[3]/_op' value='in'>";
     

      tk = "";
      x = $("#cbxStyle")[0].options.length;
      for(var i = 0; i < x; i++){
        var v = $("#ui-multiselect-cbxStyle-option-" + i);
        if (v.attr("aria-selected") && v.attr("aria-selected") != "false"){
           tk = (tk == "" ? "": tk + ",") + v.attr("value");
           found = true;
        }
      }      
      token += "<input type='hidden' name='criteria/_expr[4]/croomtype' value=\"" + tk + "\">" +
               "<input type='hidden' name='criteria/_expr[4]/_op' value='in'>";
               
              
      var ix=5; 
      tk = "";
      x = $("#cbxPre")[0].options.length;
      for(var i = 0; i < x; i++){
        var v = $("#ui-multiselect-cbxPre-option-" + i);
        if (v.attr("aria-selected") && v.attr("aria-selected") != "false"){
           if (i == 0){
             tk += '<input type="hidden" name="criteria/_expr[' + ix + ']/prvArrive" value="0"><input type="hidden" name="criteria/_expr[4]/_op" value=">">';
             ix++;
           }else{
             tk += '<input type="hidden" name="criteria/_expr[' + ix + ']/preLeave" value="0"><input type="hidden" name="criteria/_expr[4]/_op" value=">">';
             ix++;
           }
           found = true;
        }
      }      
      token += tk;
         
      tk = "";
      x = $("#cbxInfo")[0].options.length;
      for(var i = 0; i < x; i++){
        var v = $("#ui-multiselect-cbxPre-option-" + i);
        if (v.attr("aria-selected") && v.attr("aria-selected") != "false"){
           if (i == 0){
             tk += '<input type="hidden" name="criteria/_expr[' + ix + ']/hasMsg" value="0"><input type="hidden" name="criteria/_expr[' + (ix) + ']/_op" value=">">';
             ix++;
           }else if (i==1){
             tk += '<input type="hidden" name="criteria/_expr[' + ix + ']/hasLoan" value="0"><input type="hidden" name="criteria/_expr[' + (ix) + ']/_op" value=">">';
             ix++;
           }else if (i==2){
             tk += '<input type="hidden" name="criteria/_expr[' + ix + ']/hasStorage" value="0"><input type="hidden" name="criteria/_expr[' + (ix) + ']/_op" value=">">';
             ix++;
           }else if (i==3){
             tk += '<input type="hidden" name="criteria/_expr[' + ix + ']/hasLost" value="0"><input type="hidden" name="criteria/_expr[' + (ix) + ']/_op" value=">">';
             ix++;
           }
           found = true;
        }
      }      
      token += tk;       
      
      if (found == false){
        alert("至少选择一个条件才能查询房态图");
        return;
      }
      token += "<input type='hidden' name='_eosFlowAction' value='query'><input type='hidden' name='criteria/_entity' value='com.hms.OrderMgr.order.WeRoomStatusV'>";
             
      //创建查询条件
      $("#frm").empty().append($(token))[0].submit();
           
   });
});
			  
	        </script>
	        

	        
	</head>
	<body style="font-family:Tahoma">
		<table class="roomlist" align="center">
		    <%
		      int ic = 0;
		      int colsize = 8;
		      if (request.getAttribute("colSize") != null){
                colsize = Integer.parseInt(request.getAttribute("colSize").toString());
                if (colsize == 0){
                   colsize=8;
                }
              }
              boolean found = false;
             %>   
             
   <tr>
      <td colspan="<%=colsize %>">
        <select size="5" id='cbxUse'  multiple="multiple" style="display: none;">
          <option value="V">空房</option>
          <option value="O">在住</option>
        </select>

        <select size="5" id='cbxMgr' multiple="multiple" style="display: none;">
          <option value="I">清洁检查房</option>
          <option value="C">卫生</option>
          <option value="D">脏房</option>          
        </select>
        
        <select size="5" id='cbxArea' multiple="multiple" style="display: none;">
          <l:iterate id="ida" property="area">
             <option value='<b:write property="iresidentialareaid" iterateId="ida"/>'><b:write property="careaname" iterateId="ida"/></option>
          </l:iterate>
        </select>
                
        <select size="5" id='cbxStyle'  multiple="multiple" style="display: none;">
          <l:iterate id="idd" property="dictInfo">
             <option value='<b:write property="dictID" iterateId="idd"/>'><b:write property="dictName" iterateId="idd"/></option>
          </l:iterate>
        </select>           
       
   </tr>

   <tr>
      <td colspan="<%=colsize %>">
        <select size="5" id='cbxPre'  multiple="multiple" style="display: none;">
          <option value="1">预抵</option>
          <option value="2">预离</option>     
        </select>

        <select size="5" id='cbxInfo' multiple="multiple" style="display: none;">
          <option value="1">留言</option>
          <option value="2">外借</option>          
          <option value="3">物品寄存</option>
          <option value="4">物品遗留</option>          
        </select>
              
       <input type="button" id="btnQuery" class="button" value="查 询"> </td>
   </tr>
                
             <l:iterate id="id1" property="rooms">
                <%
			      found = false;                
                  if (ic % colsize == 0){
                %>
                <tr>
                <%}%>
				<td roomid='<b:write property="iroomid" iterateId="id1" />'>
				    <div class="rscontainer">
					   <div class="title"><b:write property="croomno" iterateId="id1" /></div>
					
<l:equal property="croomstatus"  targetValue="V" iterateId="id1">

     <l:equal property="chkstatus"  targetValue="V" iterateId="id1">
         <l:equal property="cclstatus"  targetValue="I" iterateId="id1">
            <div class="info tocheck"  title="空房 可用 清洁检查房">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>            
            </div>
         </l:equal>
         <l:equal property="cclstatus"  targetValue="C" iterateId="id1">
            <div class="info" title="空房 可用 卫生">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>
         </l:equal>
         <l:equal property="cclstatus"  targetValue="D" iterateId="id1">
            <div class="info dirty" title="空房 可用 脏房">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>
         </l:equal>
     </l:equal>

     <l:equal property="chkstatus"  targetValue="R" iterateId="id1">
         <l:equal property="cclstatus"  targetValue="I" iterateId="id1">
            <div class="info tocheck"  title="空房 小维修 清洁检查房">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>
         </l:equal>
         <l:equal property="cclstatus"  targetValue="C" iterateId="id1">
            <div class="info" title="空房 小维修 卫生">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>
         </l:equal>
         <l:equal property="cclstatus"  targetValue="D" iterateId="id1">
            <div class="info dirty" title="空房 小维修 脏房">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>
         </l:equal>
     </l:equal>
     
     <l:equal property="chkstatus"  targetValue="S" iterateId="id1">
         <l:equal property="cclstatus"  targetValue="I" iterateId="id1">
            <div class="info stop" title="空房 停用 清洁检查房">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>         
         </l:equal>
         <l:equal property="cclstatus"  targetValue="C" iterateId="id1">
            <div class="info stop" title="空房 停用 卫生">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>         
         </l:equal>
         <l:equal property="cclstatus"  targetValue="D" iterateId="id1">
            <div class="info stop" title="空房 停用 脏房">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>         
         </l:equal>
     </l:equal>
     
     <l:equal property="chkstatus"  targetValue="D" iterateId="id1">
         <l:equal property="cclstatus"  targetValue="I" iterateId="id1">
            <div class="info owneruse" title="空房 自住 清洁检查房">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>         
         </l:equal>
         <l:equal property="cclstatus"  targetValue="C" iterateId="id1">
            <div class="info owneruse" title="空房 自住 卫生">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>         
         </l:equal>
         <l:equal property="cclstatus"  targetValue="D" iterateId="id1">
            <div class="info owneruse" title="空房 自住 脏房">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>         
         </l:equal>
     </l:equal>
     
     <l:equal property="chkstatus"  targetValue="B" iterateId="id1">
         <l:equal property="cclstatus"  targetValue="I" iterateId="id1">
            <div class="info bad" title="空房 大修 清洁检查房">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>         
         </l:equal>
         <l:equal property="cclstatus"  targetValue="C" iterateId="id1">
            <div class="info bad" title="空房 大修 卫生">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>         
         </l:equal>
         <l:equal property="cclstatus"  targetValue="D" iterateId="id1">
            <div class="info bad"  title="空房 大修 脏房">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>         
         </l:equal>
     </l:equal>
</l:equal>

<l:equal property="croomstatus"  targetValue="O" iterateId="id1">

     <l:equal property="chkstatus"  targetValue="V" iterateId="id1">
         <l:equal property="cclstatus"  targetValue="I" iterateId="id1">
            <div class="info roomuse" title="在住 可用 清洁检查房">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>
         </l:equal>
         <l:equal property="cclstatus"  targetValue="C" iterateId="id1">
            <div class="info roomuse" title="在住 可用 卫生">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>
         </l:equal>
         <l:equal property="cclstatus"  targetValue="D" iterateId="id1">
            <div class="info roomuse" title="在住 可用 脏房">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>
         </l:equal>
     </l:equal>

     <l:equal property="chkstatus"  targetValue="R" iterateId="id1">
         <l:equal property="cclstatus"  targetValue="I" iterateId="id1">
            <div class="info roomuse" title="在住 小维修 清洁检查房">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>
         </l:equal>
         <l:equal property="cclstatus"  targetValue="C" iterateId="id1">
            <div class="info roomuse" title="在住 小维修 卫生">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>
         </l:equal>
         <l:equal property="cclstatus"  targetValue="D" iterateId="id1">
            <div class="info roomuse" title="在住 小维修 脏房">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>
         </l:equal>
     </l:equal>
     
     <l:equal property="chkstatus"  targetValue="S" iterateId="id1">
         <l:equal property="cclstatus"  targetValue="I" iterateId="id1">
            <div class="info roomuse" title="在住 停用 清洁检查房">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>         
         </l:equal>
         <l:equal property="cclstatus"  targetValue="C" iterateId="id1">
            <div class="info roomuse" title="在住 小维修 卫生">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>         
         </l:equal>
         <l:equal property="cclstatus"  targetValue="D" iterateId="id1">
            <div class="info roomuse" title="在住 小维修 脏房">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>         
         </l:equal>
     </l:equal>
     
     <l:equal property="chkstatus"  targetValue="D" iterateId="id1">
         <l:equal property="cclstatus"  targetValue="I" iterateId="id1">
            <div class="info roomuse" title="在住 自住 清洁检查房">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>         
         </l:equal>
         <l:equal property="cclstatus"  targetValue="C" iterateId="id1">
            <div class="info roomuse" title="在住 自住 卫生">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>         
         </l:equal>
         <l:equal property="cclstatus"  targetValue="D" iterateId="id1">
            <div class="info roomuse" title="在住 自住 脏房">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>         
         </l:equal>
     </l:equal>
     
     <l:equal property="chkstatus"  targetValue="B" iterateId="id1">
         <l:equal property="cclstatus"  targetValue="I" iterateId="id1">
            <div class="info roomuse" title="在住 大修 清洁检查房">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>         
         </l:equal>
         <l:equal property="cclstatus"  targetValue="C" iterateId="id1">
            <div class="info roomuse" title="在住 大修 卫生">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>         
         </l:equal>
         <l:equal property="cclstatus"  targetValue="D" iterateId="id1">
            <div class="info roomuse" title="在住 大修 脏房">
              <l:notEmpty property="igresid" iterateId="id1">		    
                <a href="#" orderid='<b:write property="iorderid" iterateId="id1"/>'><b:write property="cguestname" iterateId="id1"/></a>
              </l:notEmpty>                        
            </div>         
         </l:equal>
     </l:equal>
</l:equal>
	
<l:notEqual property="croomstatus"  targetValue="V" iterateId="id1">
   <l:notEqual property="croomstatus"  targetValue="O" iterateId="id1">
       <div class="info" title=""></div>
   </l:notEqual>
</l:notEqual>
				
					<div>
					    <div class="tips"> 
					       <%
					         found = false;
					       %>
					       <l:equal property="chkstatus" targetValue="R" iterateId="id1">
					         <div class="icon repair"  title="小维修"></div>
					       <%
					        found = true;
					       %>							         
					       </l:equal>	
					       <l:notEqual property="hasMsg" targetValue="0" iterateId="id1">
					         <div class="icon message"  title='客户留言(<b:write property="hasMsg" iterateId="id1"/>)'></div>
					       </l:notEqual>
					       <l:notEqual property="hasStorage" targetValue="0" iterateId="id1">
					         <div class="icon storage"  title="物品寄存(<b:write property="hasStorage" iterateId="id1"/>)"></div>
					       </l:notEqual>
					       <l:notEqual property="hasLoan" targetValue="0" iterateId="id1">
					         <div class="icon loan"  title="物品外借(<b:write property="hasLoan" iterateId="id1"/>)"></div>
					       </l:notEqual>
					       <l:notEqual property="hasLost" targetValue="0" iterateId="id1">
					       <div class="icon lost"  title="物品遗留(<b:write property="hasLost" iterateId="id1"/>)"></div>	
					       </l:notEqual>     
					       <l:notEqual property="prvArrive" targetValue="0" iterateId="id1">
					         <div class="icon wait"  title="预抵">
					   <%
					     found = true;
					    %>							         
					       </l:notEqual>
					       <l:notEqual property="preLeave" targetValue="0" iterateId="id1">
					         <div class="icon leave"  title="预离"></div>
					   <%
					     found = true;
					    %>							         
					       </l:notEqual>
					       <l:lessThan property="isOwe" targetValue="0" iterateId="id1">
					         <div class="icon owe"  title="欠款"></div>
					   <%
					     found = true;
					    %>							         
					       </l:lessThan>   
					    </div>
					</div>
				  </div>
				</td>
                <%
                  ic++;
                  if (ic % colsize == 0){
                %>
                </tr>
                <%
                  }
                %>
             </l:iterate>	
             
             <tr>
                <td colspan="<%=colsize %>" class="summary"><div class="title" style="width:100%" >
                <%
                   
                   int roomtotal = 0,  used = 0, preleave = 0, prearr = 0, repair = 0, stop  = 0;
                   if (request.getAttribute("rooms") != null){
                     commonj.sdo.DataObject[] rooms = (commonj.sdo.DataObject[])request.getAttribute("rooms"); 
                     roomtotal = rooms.length;
                     for(int i = 0; i < rooms.length; i++){
                       if (rooms[i].get("igresid") != null){
                         used++;
                       }
                       
                       if (rooms[i].getInt("preLeave") != 0){
                         preleave++;
                       }
                       
                       if (rooms[i].getInt("prvArrive") != 0){
                         prearr++;
                       }

                       if (rooms[i].getString("chkstatus") != null && "S".equalsIgnoreCase(rooms[i].getString("chkstatus"))){
                         stop++;
                       }

                       if (rooms[i].getString("chkstatus") != null && "R".equalsIgnoreCase(rooms[i].getString("chkstatus"))){
                         repair++;
                       }
                         
                       if (rooms[i].getString("chkstatus") != null && "B".equalsIgnoreCase(rooms[i].getString("chkstatus"))){
                         repair++;
                       }
                                                                      
                     }
                   }
                
                 %> 
                总房数：<%=roomtotal %> 间; 当前在住：<%=used %> 间; 预计当天离店：<%=preleave %> 间; 预计当天抵店：<%=prearr %> 间; 今天可出租房：0 间; 维修：<%=repair %> 间; 停用:<%=stop %> 间
                </div></td>
             </tr>															
		</table>
		
		<div class="tooltip tiphidden" id="tipText">
		
		</div>
		
		<form action="com.hms.OrderMgr.RoomStatus.flow" method="post" target="_self" id="frm">	   		   		   
		</form>
	</body>
	
</html>
